#include <iostream>
using namespace std;
int main()
{
  int A,B,r = 0;
  cin>>A;
  cin>>B;
  r = 0;
  if (A<B)
  {
    for (;A <= B ;A++)
    {
      r = r + (A*A);
    }
    cout<<"\n"<<r;
  }
  system("PAUSE>>null");
  return 0;
}

